package com.efuture.chaptertow

/* @Description: 匿名函数与具名函数
 * @Auther: zhaoshanshan
 * @Date: 2022/03/04/9:53 下午
 */
fun main() {
    //匿名函数方式
//    methodOne("zhaoshanshan",30,"kotlin"){//匿名函数
//        println("$it")
//    }
    //具名函数方式
    methodOne("zhaoshanshan",30,"kotlin",::methodTwo);
}
fun methodTwo(result:String){
  println(result);
}
fun methodOne(name:String,age:Int,study:String,result:(String)->Unit){
    result("name:$name,age:$age,study:$study");
}
    